<?php
/**
 * This example shows how easy it is to switch from standard sessions to PageBricks_SessionMysqli.
 * 
 * All that you need to change is in six lines: <br>
 * Four lines to add your DB info, <br>
 * One line to include the class file, <br>
 * One line to instantiate a new PageBricks_SessionMysqli object. Done.
 *  
 * Then you can work in the same way you used to work with PHP's standard sessions.
 * 
 * @package    PageBricks
 * @subpackage Xamples
 * @filesource
 */
/**
 *
 */
$dbHost = '';
$dbUser = '';
$dbPwd = '';
$dbDb = '';

require_once '../SessionMysqli.php';
$sess = new PageBricks_SessionMysqli($dbHost,$dbUser,$dbPwd,$dbDb);
// start a session as you normally would...
session_start();

//////////////////////////////////////////////
//your session managed code goes here
//////////////////////////////////////////////



// the following lines are for demonstration purposes only, play around with it...
// you can use all the other standard PHP session functions:
session_destroy();
// after destroying the session, the link to the session handler is lost
$sess = new PageBricks_SessionMysqli($dbHost,$dbUser,$dbPwd,$dbDb);
session_name('mySessionWithNewName');
session_start();

if (isset($_SESSION['mySessionValue'])) {
	echo $_SESSION['mySessionValue'];
} else {
	$_SESSION['mySessionValue'] = 'someContent';
}
//uncomment the next line when you are finished testing to rid of the data
//session_destroy;
?>